<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ECharts</title>
</head>
<script src="echarts.js"></script>
<body>
<!--创建一个div-->
<div id="main" style="width: 400px;height: 600px;background-color:#FFF333";>

</div>
<script>
    //初始化对象
    var mychart = echarts.init(document.getElementById('main'));
    option = {
        xAxis: {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                data: [150, 230, 224, 218, 135, 147, 260],
                type: 'pie'
            },
            {
                data: [820, 932, 901, 934, 1290, 1330, 1320],
                type: 'line',
                smooth: true
            }
        ]
    };
    mychart.setOption(option)
</script>
</body>
</html>